const {parse,format}=require('path');

const filePath='/user/local/node_modules/n/package.json';

const ret=parse(filePath);

console.log((ret));

console.log(format(ret));